home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / mazda / STW311.dxr / Internal_26_Go to Movie.ls < prev    next >
Encoding:
Text File  |  1998-05-12  |  1.6 KB  |  55 lines

  1. property movieName, playMode, whichevent
  2.  
  3. on initGotoMovie me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11. end
  12.  
  13. on prepareFrame me
  14.   if whichevent = #prepareFrame then
  15.     init(me)
  16.   end if
  17. end
  18.  
  19. on exitFrame me
  20.   if whichevent = #exitFrame then
  21.     init(me)
  22.   end if
  23. end
  24.  
  25. on init me
  26.   set the movieName of me to get_filename(movieName)
  27.   case playMode of
  28.     "Go to":
  29.       go(1, movieName)
  30.     "Play and Return":
  31.       play movie movieName
  32.   end case
  33. end
  34.  
  35. on get_filename f_name
  36.   if not (f_name contains ".dir") then
  37.     set f_name to f_name & ".dir"
  38.   end if
  39.   if (f_name contains "/") or (f_name contains "\") then
  40.     if not f_name contains ":" then
  41.       set f_name to the pathName & f_name
  42.     end if
  43.   end if
  44.   return f_name
  45. end
  46.  
  47. on getPropertyDescriptionList
  48.   set p_list to [#movieName: [#comment: "Movie:", #format: #string, #default: "       "], #playMode: [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #prepareFrame, #exitFrame, #initGotoMovie], #default: #mouseUp]]
  49.   return p_list
  50. end
  51.  
  52. on getBehaviorDescription
  53.   return "Plays a new Director movie in the same window." & RETURN & "ΓÇó Movie - Enter the file name of a movie to play." & RETURN & "ΓÇó Play Mode - Choose Play and Return to return to the current movie when the Playback Head reaches the end of the other movie or when the Play Done behavior is encountered. Choose Go To to play the other movie without returning to the current movie." & RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior."
  54. end
  55.